const router = require('express').Router()
const banners = require("./banners")
const Daliywelfare = require("./Daliywelfare")
const Classification = require("./Classification")
const Sale = require("./Sale")
const Iflashbuy = require("./Iflashbuy")


router.get('/banners', (req, res) => res.send({banners}))
router.get('/Daliywelfare', (req, res) => res.send({Daliywelfare}))
router.get('/Classification', (req, res) => res.send({Classification}))
router.get('/Sale', (req, res) => res.send({Sale}))
router.get('/Iflashbuy', (req, res) => res.send({Iflashbuy}))



// 这是推荐的接口数据
router.get('/api/recommend',(req,res,next)=>{
        res.send({
    code:0,
    msg:"发送成功",
    data:[
        {
          id:5,
          img:'./images/面条机.jpg',
          introduce:'晋腾家用不锈钢手动压面机手摇多功能面条机水果榨汁机',
          price:'￥99',
          reputation:'好评率94%',
          like:'看相似',
          btotitle:'特价',
          "pathss":'',
        },
        {
          id:6,
          img:'./images/女款连衣长裙.jpg',
          introduce:'品柜 连衣裙长袖2018春装 新款韩版时尚女装修身显瘦',
          price:'￥199',
          reputation:'好评率97%',
          like:'看相似',
          btotitle:'优惠',
          "pathss":'',
        },
        {
          id:7,
          img:'./images/超宽屏液晶电视.jpg',
          introduce:'LG 29WK600-W 29英寸 21:9 超宽屏 FHD FreeSync显示器',
          price:'￥1299',
          reputation:'好评率92%',
          like:'看相似',
          btotitle:'反馈',
          "pathss":'',
        },
        {
          id:12,
          img:'./images/小鱼干.jpg',
          introduce:'劲仔小鱼 鱼干鱼仔 零食 香辣味 15g*20包/盒',
          price:'￥9.9',
          reputation:'好评率99%',
          like:'看相似',
          btotitle:'好评',
          "pathss":'',
        },
      ]
        })
})

router.get('/goods_cart',(req , res , next)=>{
  res.send({
      data:1
  })
  console.log(res);
  })
module.exports = router